<%@ Page Language="VB" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="false" CodeFile="RequiredFields.aspx.vb" Inherits="Admin_RequiredFields" title="Admin - Required Fields" %>
<%@ Register Src="SubNavControls/FieldsSubNavControl.ascx" TagName="FieldsSubNavControl" TagPrefix="uc1" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

<uc1:FieldsSubNavControl ID="SubNavCtrl" runat="server" />
<asp:ObjectDataSource ID="RequiredFieldsObjectDataSource" runat="server" DataObjectTypeName="Cdm.DataCore.LookupTables.LuAdminTableList" DeleteMethod="RemoveInstance" InsertMethod="SaveInstance" SelectMethod="ListRequiredFieldTables"
        TypeName="Cdm.DataCore.LookupTables.LuAdminTableList" UpdateMethod="UpdateInstance"></asp:ObjectDataSource>    
        
    <asp:ObjectDataSource ID="RequiredFieldsGridViewObjectDataSource" runat="server" SelectMethod="ListBySort"
        TypeName="Cdm.DataCore.Admin.AdminRequiredField" DataObjectTypeName="Cdm.DataCore.Admin.AdminRequiredField" UpdateMethod="UpdateInstance" InsertMethod="SaveInstance" SortParameterName="sortExpr">
        <SelectParameters>
            <asp:ControlParameter ControlID="DDLReqFields" DefaultValue="" Name="TableID" PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>


    <table cellpadding="0" cellspacing="0">
<tr><td style="width:20px;" rowspan="2"></td>
<td><h1><a id="pagecontent">Admin - Required Fields</a></h1></td>
    <td align="right" style="width:65%"><asp:Label ID="Label1" runat="server" AssociatedControlID="DDLReqFields" Text="Select Screen:" CssClass="adminSelectLabel"></asp:Label>
    <asp:DropDownList ID="DDLReqFields" runat="server" CssClass="adminSelectForm" DataSourceID="RequiredFieldsObjectDataSource" DataTextField="DisplayName" DataValueField="TableId" AutoPostBack="false">
    </asp:DropDownList>
    <asp:Button ID="SubmitScreenButton" runat="server" Text="Go" /></td>
    </tr><tr>
    <td colspan="2" align="center">
    <cc2:ScrollingGridView ID="RequiredFieldsScrollingGridView" runat="server" CssClass="gridOffsetSmall" IsFixedColumn="true" AutoGenerateColumns="False" Caption="Select which fields are required to upload a file to the system." CaptionAlign="Top" ToolTip="155"
            DataSourceID="RequiredFieldsGridViewObjectDataSource" DataKeyNames="RequiredFieldID" CellPadding="5" BorderColor="#21334B" 
                BorderStyle="Solid" GridLines="Vertical" AllowSorting="true">
        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
        <Columns>
            <asp:TemplateField HeaderText="Field Name" SortExpression="FieldDisplayName">
            <ItemStyle Width="410px" />
            <HeaderStyle Width="416px" />
            <ItemTemplate><%#Eval("FieldDisplayName")%></ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Required" SortExpression="IsRequired">
            <ItemStyle Width="380px" />
            <HeaderStyle Width="410px" />
            <ItemTemplate>
                <asp:CheckBox ID="IsRequiredCheckBox" runat="server" Checked='<%#Eval("IsRequired")%>' ToolTip="check to make field required" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="center" />
            </asp:TemplateField>
        </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" /></cc2:ScrollingGridView>
    </td>
    </tr>
    </table>
   
    
</asp:Content>
<asp:Content ID="FixedRegion" runat="server" ContentPlaceHolderID="ContentPlaceHolderFixedAdmin">
        <asp:Button ID="SaveButton" runat="server" Text="Save" />
</asp:Content>

